"""
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    created by lane.chang on '26/10/2024'
    comment: apollo工程相关
"""
from config import Config
from project.model.micro_service import MicroService


class Adonis:

    @staticmethod
    async def set_cron(command, comment, minute='*', hour='*', day='*', month='*', week='*'):
        """ 设置定时任务
        :param command:
        :param comment:
        :param minute:
        :param hour:
        :param day:
        :param month:
        :param week:
        :return:
        """
        await MicroService(domain=Config.ADONIS_SERVER).post(url_path='/cron/add',
                                                             command=command,
                                                             comment=comment,
                                                             minute=minute,
                                                             hour=hour,
                                                             day=day,
                                                             month=month,
                                                             week=week)
